package com.dys;

import com.dys.service.AccountService;
import com.dys.service.impl.AccountServiceImpl;
import com.dys.service.impl.AccountServiceImpl03;
import com.dys.service.impl.AccountServiceImpl2;

import java.math.BigDecimal;
import java.sql.SQLException;

/**
 * @className: com.dys.AccountServiceTest
 * @description: 测试转账业务逻辑
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/09/13 下午9:47
 */
public class AccountServiceTest {
    /**
     * 这是一个main()方法,是应用程序的入口
     *
     * @param args 方法的形参列表,是一个字符串数组,包含了从命令行传递给程序的参数
     */
    public static void main(String[] args) throws SQLException {
        testService3();
    }

    public static void testService() throws SQLException {
        AccountService accountService = new AccountServiceImpl();
        String info = accountService.transfer("1001", "1002", "1234", new BigDecimal("200"));
        System.out.println(info);
    }

    public static void testService2() throws SQLException {
        AccountService accountService = new AccountServiceImpl2();
        String info = accountService.transfer("1001", "1002", "1234", new BigDecimal("200"));
        System.out.println(info);
    }

    public static void testService3() throws SQLException {
        AccountService accountService = new AccountServiceImpl03();
        String info = accountService.transfer("1001", "1002", "1234", new BigDecimal("200"));
        System.out.println(info);
    }
}
